<?php 
namespace app\index\model;

use think\Model;
use traits\model\SoftDelete;

//user表的模型类
class Businesscenter extends Model{



	//引用SoftDelete,软删除
	protected static $deleteTime = 'delete_time';

	//自动完成字段设置
	protected $auto = ['create_time'];

	//protected $update = ['login_ip'];
	//自动获取IP
	protected function setIpAttr(){
		return request()->ip();
	}
	/*//自动MD5加密
	protected function setPasswordAttr($value){
		return md5($value);
	}*/

	//更新时间

    protected function setCreateTimeAttr($value){
        return strtotime($value);
    }

   /* //一对一关联模型
    public function Account(){

        return $this->hasOne('Account','user_id','id');
    }*/

    //多对多 报单中心模型  用户表-报单表-报单中心表
   /* public function User(){

        return $this->belongsToMany('User','\\app\\model\\Deal_list','Business_Center_id','id');
    }*/


}


 ?>